home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 1
/
Merciful - Disc 1.iso
/
software
/
m
/
math_vision
/
mathvisionv2.1b.dms
/
mathvisionv2.1b.adf
/
Arexx.CLI
/
KleinZoom.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-02-14
|
3KB
|
99 lines
/* ZOOM.REXX, an ARexx program for MathVision, 3-Sep-89 dh */
/*============================== User Settings =============================*/
NUMERIC DIGITS 15
Pictures = 50 /* Number of pictures to plot */
StartPicture = 0 /* Picture to start plotting with */
BaseFilename = "Mandelbrot_Zoom:Pic" /* Basic pathname for pictures */
xcenter0 = 0 /* coordinates of starting (big) picture */
xwidth0 = 4
ycenter0 = 0.00001
ywidth0 = 3
xcenter1 = -.73695 /* coordinates of ending (small) picture */
xwidth1 = 0.0005
ycenter1 = .2014
ywidth1 = .0004
/*==========================================================================
This generic Arexx program will allow you to create a series of zoomed
pictures in contour plot mode. It is assumed that you have already entered
the appropriate functions, colors and setting in MathVision.
It takes into account the fact that as you zoom in closer, you must use
smaller increments.
To use this program, you must edit this file, and put in the appropriate
values in the User Settings section which follows.
The 'BaseFilename' is the basic name which will be used for all the pictures.
For example, if you put "PLOTS:PIC", the files will be named "PLOTS:PIC0000",
"PLOTS:PIC0001", "PLOTS:PIC0002", and so on. The number of the picture is
appended to the basic file name.
'Pictures' is how many frames you want in this zoom. A higher setting
here will give you smoother animation. The pictures will be numbered starting
at 0 and going up to Pictures-1.
'StartPicture' is useful if your plotting has to be restarted because of
some interrupt, like a Drastic Power Failure or Real Work. Just plug in the
number of the next picture to plot, and it will start right there. Normally
this value is 0. This lets you work on your computer during the day, and
resume the plotting during the night.
You must give the starting and ending coordinates of your zoom. These
are given in the variables xmin_start, xmin_end, and etc.
============================================================================*/
ADDRESS "MathVision"
OPTIONS RESULTS /* We need answers */
OPTIONS FAILAT 1 /* everything is fatal */
SIGNAL ON ERROR /* if error, goto ERROR: */
xfactor = xwidth1/xwidth0
yfactor = ywidth1/ywidth0
DO PictureNumber = StartPicture TO Pictures-1 /* for each picture...*/
Filename = BaseFilename||Right(PictureNumber,4,"0") /* status report */
SAY "Plotting: "Filename
mult = (PictureNumber) / (Pictures-1) /* 0..1 */
xmag = power(xfactor,mult)
ymag = power(yfactor,mult)
xwidth = xwidth0*xmag
ywidth = ywidth0*ymag
xcenter = xcenter0+((xcenter1-xcenter0)*(xmag-1) / (xfactor-1) )
ycenter = ycenter0+((ycenter1-ycenter0)*(ymag-1) / (yfactor-1) )
Xmin xcenter-xwidth/2 /* plug in the new values */
Xmax xcenter+xwidth/2
Ymin ycenter-ywidth/2
Ymax ycenter+ywidth/2
PlotContour /* do the appropriate plot */
Pathname Filename /* set the name for this file */
SavePicture /* save it to disk */
Get StopSign
IF Result = "T" THEN BREAK
END /* do */
EXIT
/*------------------------------- functions ------------------------------- */
power: /* number to power */
arg base, pow
Get Eval base"^"pow /* kick DMA to evaluate this */
return(result)
ERROR: /* Error Diagnostic for return codes */
Get Diagnosis RC
SAY RESULT" on line "SIGL
EXIT